package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserDao {
    public User findByUsername(String username);


    User findDetailByUsername(String username);

    List<User> findMeauByUsername(String username);

    Page<User> findAllUser(String queryString);

    void add(User user);

    void addUserAndRoleAssociation(@Param("roleIds") Integer[] roleIds, @Param("id") Integer id);

    User findUserById(Integer id);

    List<Integer> findRoleIdsByUserId(Integer id);

    void deleteAndRoleAssociation(Integer id);

    void edit(User u);

    void delete(Integer id);
}
